import { createApp } from 'vue';
import router from './router';
import i18n from './i18n';
import { initI18n } from './i18n/init';
import pinia from './stores';
import App from './App.vue';
import VueLazyload from 'vue3-lazyload';
import '@/styles/index.css';
import '@/assets/iconfont/iconfont.css';

const setupAll = async () => {
    const app = createApp(App);

    await initI18n();
    app.use(i18n);
    app.use(pinia);
    app.use(router);
    app.use(VueLazyload, {
        loading: '/images/loading.gif', // 加载中的图片
        error: '/images/error.png' // 加载失败的图片
    });

    app.mount('#app');
};

setupAll();
